function mediaLib(){
	
	/**
	 * @type object<mediaItem>
	 */
	this.Items = [];
	var self = this;
	
	this.init = function(){
		/*
		 * websocket: erste Lieder holen
		 * websocket: rootDir holen
		 */
		var tt = setTimeout(function(){
			CORE.Websocket.emit('getMedia', {url:'/',deep:1}, receiveMedia);
		}, 2000);
		
		var t = setInterval(render, 1000);
	};
	
	var receiveMedia = function(e){
		$(e).each(function(key, value){
			self.Items.push(value);
		});
		CORE.Websocket.getMediaStream(self.Items[0], {off:0})
		CORE.Playlist.addItems(self.Items[0]);
	};
	
	var render = function(){
		$(".mediaLib ul").empty();
		$(self.Items).each(function(key, value){
			$(".mediaLib ul").append('<li><span>'+value.Meta.title+'</span></li>');
		});
	};
	
	this.init();
};